

export interface NdCard {
    id: string;
    order?: number;
    __activeType?: 'show'|'move'|'enter';
    [key: string]: unknown;
}

export interface NdCardList {
    id: string;
    title: string;
    cards: NdCard[];
    order?: number;
    __activeType?: 'show'|'move'|'enter';
    [key: string]: unknown;
}

export interface DragCardListData {
    targetCardList: NdCardList | null;
    targetCardListIndex?: number;
}
export interface DragCardData {
    targetCard: NdCard | null;
    // 目标卡片列表id
    targetCardListId: string|number;
    // 当前进入的卡片列表id
    sourceCardListId?: string|number;
    // 当前进入的卡片索引
    sourceCardOrder?: number;
}
// 卡片拖拽数据
export interface CardDrapOffsetData{
    index: number;
}
export type SetTargetCardListHandler = (targetCardList: NdCardList) => void;
export type SetTargetCardHandler = (targetCard: NdCard, cardListId: string|number) => void;
export type SetCardListElHandler = (cardListId: string|number, el: HTMLElement) => void;
export type SetCardElHandler = (cardId: string|number, el: HTMLElement) => void;
export type CardListDragEndHandler = () => void;
export type CardDragStartListener = (e: DragEvent, card: NdCard, cardListId: string|number) => void;
export type CardDragEndListener = () => void;
export type CardDragOverListener = (e: DragEvent, cardListId: string|number) => void;
export type CardSelectListener = (card: NdCard) => void;
export type CreateCardListener = (title: string, listId: string|number, callback: () => void) => void;